
@echo off
set BUILD_TYPE=%~1
shift
set BUILD_ARG=%~1

if "%BUILD_TYPE%" == "Debug" (
	set DDK_BUILD_TYPE=chk
) else (
	set DDK_BUILD_TYPE=fre
)

if "%BUILD_ARG%"=="-rebuild" (set BUILD_OPTS=/c /Z)

if "%BUILD_ARG%" == "-clean" (
	rd /s /q obj%DDK_BUILD_TYPE%_wxp_x86\ 2>NUL:
	del /s /q build%DDK_BUILD_TYPE%_wxp_x86.* 2>NUL:
) else (
	echo %~dp0
	pushd .
	call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ %DDK_BUILD_TYPE% x86 WXP no_oacr
	popd
	build %BUILD_OPTS%
)

